<script setup>
import {ref, onMounted} from 'vue'
import {getCurrentInstance} from 'vue'
import {message} from "../utils/resetMessage";

defineProps({
  msg: String
})

const count = ref(0)
onMounted(() => {
  // ElMessage.error("系统错误，请联系管理员");
})

const instance = getCurrentInstance()

const countAdd = () => {
  count.value += 1
  message({
    type: "warning",
    message: "123"
  })
  // ElMessage.error("系统错误，请联系管理员");
}

</script>

<template>
  <h1>{{ msg }}</h1>

  <p>
    <a href="/about">go about</a>
  </p>

  <button type="button" @click="countAdd">count is: {{ count }}</button>
  <p>
    Edit
    <code>components/HelloWorld.vue</code> to test hot module replacement.
  </p>
</template>

<style scoped>
a {
  color: #42b983;
}
</style>
